// 教师管理相关的API
import request from './request';

// 获取教师列表
export function getTeacherList(params) {
  return request({
    url: '/teacher/list',
    method: 'get',
    params
  });
}

// 获取教师详情
export function getTeacherDetail(id) {
  return request({
    url: `/teacher/${id}`,
    method: 'get'
  });
}

// 添加教师
export function addTeacher(data) {
  return request({
    url: '/teacher',
    method: 'post',
    data
  });
}

// 更新教师信息
export function updateTeacher(id, data) {
  return request({
    url: `/teacher/${id}`,
    method: 'put',
    data
  });
}

// 删除教师
export function deleteTeacher(id) {
  return request({
    url: `/teacher/${id}`,
    method: 'delete'
  });
}

// 批量删除教师
export function batchDeleteTeachers(ids) {
  return request({
    url: '/teacher/batch',
    method: 'delete',
    data: { ids }
  });
}

// 获取院系列表
export function getDepartmentList() {
  return request({
    url: '/department/list',
    method: 'get'
  });
}

// 获取职称列表
export function getTitleList() {
  return request({
    url: '/title/list',
    method: 'get'
  });
}